package com.xinke.juc.case03;

import lombok.extern.slf4j.Slf4j;

/**
 * @Author：xinke
 * @Date：2025/9/30
 * @Desc:
 */
@Slf4j
public class TestInterrupt01 {
    public static void main(String[] args) throws InterruptedException {
        Thread t1 = new Thread(()->{
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
        },"t1");
        t1.start();
        Thread.sleep(500);
        t1.interrupt();
        log.info("打断状态：{}",t1.isInterrupted());
    }
}
